package day0310;

import store.model.Account;
import store.model.Goods;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public class Demo03 {

    public static void main(String[] args) {
        List<String>[] lists = new List[3];

        lists[0] = new ArrayList<>();


        List<String> list = new ArrayList<>();

        list.add("asb");
//        list.add(111);

        for (int i = 0; i < list.size(); i++) {
            // java 隐式类型转换
            String str = (String)list.get(i);

            str.charAt(i);
        }

        MyList<Goods> goodsMyList = new MyList<>();

//        goodsMyList.add(1);

        MyList<Account> accountMyList = new MyList<>();

        GoodsList add = new AccountList().add(new GoodsList());
        AccountList add1 = new AccountList().add(new AccountList());
    }
}
class AccountList {

    public <E> E add(E e){
        return e;
    }
}

class GoodsList {}

class MyList<E> {

    E[] goods;

    public void add(E e) {
        goods[0] = e;
    }

}
